<!doctype html>
<html>
<head>
    <title>推广订单</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="/css/style.css?v=4">
    <link rel="stylesheet" href="/css/font-awesome.min-4.3.0.css">
	<script src="/js/jquery.min-2.1.3.js"></script>
</head>

<body>

	<div class="my-memvers">
		<section class="member-count">
			<h2 class="member-count-title"><i class="icon-chunk-gray"><i class="icon-chunk-blue"></i></i><span>推荐订单数据</span></h2>
			<div class="row member-count-row">
				<div class="small-4 columns member-count-column"><span class="member-count-label">今日新增</span><em class="member-count-number">{$today_count}</em></div>
				<div class="small-4 columns member-count-column"><span class="member-count-label">昨日新增</span><em class="member-count-number">{$yesday_count}</em></div>
				<div class="small-4 columns member-count-column"><span class="member-count-label">订单总数</span><em class="member-count-number">{$count}</em></div>
			</div>
		</section>
		<section class="member-browse">
			<h2 class="member-browse-title"><i class="icon-chunk-gray"><i class="icon-chunk-blue"></i></i>
			<span>详细订单记录</span></h2>
			<ul class="member-browse-ul" id="order_list">
				<!--{loop $orders $one}-->
				<li class="member-browse-li">
					<div class="row member-browse-summey">
						<a class="member-browse-summey-info" href="#">                 
							<div class="member-browse-nt">                           
								<span class="member-browse-name" style="font-weight:bold;">
									订单：{$one['id']}
									<span class="pro-price">【
									<!--{if $one['state']=='pay'}-->
										<!--{if $one['pin_state'] == 1}-->
											已完成
										<!--{else}-->
											拼团中
										<!--{/if}-->
									<!--{else}-->
									待支付
									<!--{/if}-->
									
									】</span>
								</span>
							</div>
						</a>                   
					</div>
					<div class="member-browser-pro-list">
						<a class="member-browser-pro-a" href="#"><span class="pro-img">
							<img src="${team_image($teams[$one['team_id']]['image'])}"></span>
							<p class="pro-info"><span class="pro-name" style="color:#999;">{$teams[$one['team_id']]['title']}</span>
							<span class="pro-price">预估佣金：<strong>+{$one['commission_money']}</strong></span>
							<span class="pro-price">&nbsp;&nbsp;&nbsp;&nbsp;数量：<strong>{$one['quantity']}</strong></span></p>
						</a>
					</div>
					<div class="row member-browse-summey">
						<a class="member-browse-summey-info" href="#">                 
							<div class="member-browse-nt">                           
								<span class="member-browse-name" style="color:#999;">购买人：{$users[$one['user_id']]['username']}&nbsp;&nbsp;&nbsp;&nbsp;金额：{$one['origin']}
								<br/>日期：${date('Y-m-d',$one['create_time'])}</span>
							</div>
						</a>                   
					</div>
				</li>
				<!--{/loop}-->
				
			</ul>
		</section>
	</div>	
		
         <div>
		 <div class="center" id="center_pullup" style="display:none;">
		 <span><img class="img_rotate" src="/images/pull_loading_8eba142.png"/>
		 </span><span class="orders_text"></span>
		 </div>
		<script>
		var offset = 0;
		var _pa = 2;
		var is_can_next = 1;
		var cur_url = "{$cur_url}";
		function loaddata()
		{ 
			totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());     //浏览器的高度加上滚动条的高度 

			if ($(document).height() <= totalheight+200)     //当文档的高度小于或者等于总的高度的时候，开始动态加载数据
			{ 
				if(is_can_next == 1)//加载数据
				{
					is_can_next = 0;
					nextpage();
				}
			} 
		} 
		function nextpage()
		{	
			var best_url = cur_url+'?page='+_pa;
			$('#center_pullup').show();
			$.ajax(
				{ 
					url: best_url, 
					dataType: 'json', 
					success: function(result){
						if(result.ret>0){
							if(_pa != 1)
							{
								$('#center_pullup').hide();
							}
							//$('.nextpage').hide();	
							return false;
						}
						if(result.offset == offset)
						{
							$('#center_pullup').hide();
							return false;
						} else {
							offset = result.offset;
						}
						$('#order_list').append(result.html);
						$('#center_pullup').hide();
						_pa++;
						is_can_next = 1;
					}
				}
			);
		}

		$(function(){
			
			$(window).scroll( function() { 
				loaddata();
			}); 
			
		})
		</script>
	
  </div>
    <div style="height:58px;visibility:hidden "></div>
    <!--{include footer}-->




